package beautiful.butterfly.drds.data_exchange.core.util.container;

import org.apache.commons.lang3.StringUtils;

import java.io.File;


public class Constants
{

    public static final String datax_core_container_taskgroup_channel = "core.container.taskgroup.channel";

    public static final String datax_core_container_model = "core.container.model";

    public static final String datax_core_container_job_id = "core.container.job.id";

    public static final String datax_core_container_trace_enable = "core.container.trace.enable";

    public static final String datax_core_container_job_mode = "core.container.job.mode";

    public static final String datax_core_container_job_reportinterval = "core.container.job.reportinterval";

    public static final String datax_core_container_job_sleepinterval = "core.container.job.sleepinterval";

    public static final String datax_core_container_taskgroup_id = "core.container.taskgroup.id";

    public static final String datax_core_container_taskgroup_sleepinterval = "core.container.taskgroup.sleepinterval";

    public static final String datax_core_container_taskgroup_reportinterval = "core.container.taskgroup.reportinterval";

    public static final String datax_core_container_task_failover_maxretrytimes = "core.container.task.failover.maxretrytimes";

    public static final String datax_core_container_task_failover_retryintervalinmsec = "core.container.task.failover.retryintervalinmsec";

    public static final String datax_core_container_task_failover_maxwaitinmsec = "core.container.task.failover.maxwaitinmsec";


    public static final String datax_core_dataxserver_timeout = "core.dataxserver.timeout";


    public static final String datax_core_report_datax_perflog = "core.dataxserver.reportperflog";

    public static final String datax_core_transport_channel_class = "core.transport.channel.class";

    public static final String datax_core_transport_channel_capacity = "core.transport.channel.capacity";

    public static final String datax_core_transport_channel_capacity_byte = "core.transport.channel.bytecapacity";

    public static final String datax_core_transport_channel_speed_byte = "core.transport.channel.speed.byte";

    public static final String datax_core_transport_channel_speed_record = "core.transport.channel.speed.record";

    public static final String datax_core_transport_channel_flowcontrolinterval = "core.transport.channel.flowcontrolinterval";

    public static final String datax_core_transport_exchanger_buffersize = "core.transport.exchanger.buffersize";

    public static final String datax_core_transport_record_class = "core.transport.record.class";

    public static final String datax_core_statistics_collector_plugin_taskclass = "core.statistics.collector.plugin.taskclass";

    public static final String datax_core_statistics_collector_plugin_maxdirtynum = "core.statistics.collector.plugin.maxdirtynumber";

    public static final String datax_job_content_reader_name = "job.content[0].reader.name";

    public static final String datax_job_content_reader_parameter = "job.content[0].reader.parameter";

    public static final String datax_job_content_writer_name = "job.content[0].writer.name";

    public static final String datax_job_content_writer_parameter = "job.content[0].writer.parameter";

    public static final String datax_job_jobinfo = "job.jobinfo";

    public static final String datax_job_content = "job.content";

    public static final String datax_job_content_transformer = "job.content[0].transformer";


    public static final String datax_job_setting_speed_byte = "job.setting.speed.byte";

    public static final String datax_job_setting_speed_record = "job.setting.speed.record";

    public static final String datax_job_setting_speed_channel = "job.setting.speed.channel";


    public static final String datax_job_setting_errorlimit_record = "job.setting.errorlimit.record";

    public static final String datax_job_setting_errorlimit_percent = "job.setting.errorlimit.percentage";

    public static final String datax_job_setting_dryrun = "job.setting.dryrun";

    public static final String datax_job_prehandler_plugintype = "job.prehandler.plugintype";

    public static final String datax_job_prehandler_pluginname = "job.prehandler.pluginname";

    public static final String datax_job_posthandler_plugintype = "job.posthandler.plugintype";

    public static final String datax_job_posthandler_pluginname = "job.posthandler.pluginname";
    // ----------------------------- 局部使用的变量
    public static final String job_writer = "reader";

    public static final String job_reader = "reader";

    public static final String job_transformer = "transformer";

    public static final String job_reader_name = "reader.name";

    public static final String job_reader_parameter = "reader.parameter";

    public static final String job_writer_name = "writer.name";

    public static final String job_writer_parameter = "writer.parameter";

    public static final String transformer_parameter_columnindex = "parameter.columnindex";
    public static final String transformer_parameter_paras = "parameter.paras";
    public static final String transformer_parameter_context = "parameter.context";
    public static final String transformer_parameter_code = "parameter.code";
    public static final String transformer_parameter_extrapackage = "parameter.extrapackage";

    public static final String task_id = "taskid";


    // ----------------------------- 环境变量 ---------------------------------

    public static String datax_home = System.getProperty("datax.home");

    public static String datax_conf_path = StringUtils.join(new String[]{
            datax_home, "conf", "core.json"}, File.separator);


    public static String datax_plugin_reader_home = StringUtils.join(
            new String[]{datax_home, "plugin", "reader"}, File.separator);

    public static String datax_plugin_writer_home = StringUtils.join(
            new String[]{datax_home, "plugin", "writer"}, File.separator);


    public static String datax_storage_transformer_home = StringUtils.join(
            new String[]{datax_home, "local_storage", "transformer"}, File.separator);


}
